home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / lisp / wgdb-42.lha / wgdb-4.2 / Makefile < prev    next >
Makefile  |  1992-09-11  |  8KB  |  259 lines

  1. ALL=all.internal
  2. host_alias = sun4
  3. host_cpu = sparc
  4. host_vendor = sun
  5. host_os = sunos4
  6. target_alias = sun4
  7. target_cpu = sparc
  8. target_vendor = sun
  9. target_os = sunos4
  10. subdir =
  11. unsubdir = .
  12. VPATH = .
  13. #
  14. # Makefile for directory with subdirs to build.
  15. #   Copyright (C) 1990, 1991 Cygnus Support
  16. #
  17. # This file is free software; you can redistribute it and/or modify
  18. # it under the terms of the GNU General Public License as published by
  19. # the Free Software Foundation; either version 2 of the License, or
  20. # (at your option) any later version.
  21. # This program is distributed in the hope that it will be useful,
  22. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  23. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  24. # GNU General Public License for more details.
  25. # You should have received a copy of the GNU General Public License
  26. # along with this program; if not, write to the Free Software
  27. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  28. #
  29. # Last Mod Thu Oct 10 00:24:41 PDT 1991, by rich@cygnus.com
  30. #
  31. # $Id: Makefile.in,v 1.43 1991/10/16 19:54:30 gnu Exp $
  32.  
  33. srcdir = .
  34. destdir = /usr/local
  35.  
  36. SHELL=/bin/sh
  37.  
  38. #CC = gcc -b$(target) # -B$(srcdir)/../gas/Host-$(host)/Target-$(target)/
  39. #CFLAGS = -g -nostdinc -nostdlib -I- -I/usr/local/lib/gcc/$(target)/1.92/include -I$(srcdir) -I$(srcdir)/../include -I$(OSINCLUDE)
  40.  
  41. RANLIB = ranlib
  42. AR = ar
  43. AR_FLAGS = cq
  44. BISONPATH = 
  45.  
  46. BISON = `if [ -d $(unsubdir)/../bison ] ; \
  47.     then echo \`pwd\`/$(unsubdir)/../bison$(subdir)/bison -L \`pwd\`/$(unsubdir)/../bison/ ; \
  48.     else echo yacc ; fi`
  49.  
  50. SUBDIRS = libiberty bfd binutils bison gcc readline ld gas gnulib  gdb emacs make grep diff rcs gdbm cvs prms
  51. OTHERS = 
  52.  
  53. #### host and target specific makefile fragments come in here.
  54. ###
  55.  
  56. all:
  57.     $(MAKE) subdir_do DO=all "DODIRS=$(SUBDIRS) $(OTHERS)"
  58.  
  59. subdir_do: force
  60.     for i in $(DODIRS); do \
  61.         if [ -d $(unsubdir)/$$i -o -d $(unsubdir)/$$i.$(target) ] ; then \
  62.             if (cd $(unsubdir)/$$i`if [ -d $(unsubdir)/$$i.$(target) ] ; \
  63.                 then echo .$(target) ; fi`$(subdir); \
  64.                 $(MAKE) \
  65.                     "against=$(against)" \
  66.                     "AR=$(AR)" \
  67.                     "CC=$(CC)" \
  68.                     "AR_FLAGS=$(AR_FLAGS)" \
  69.                     "RANLIB=$(RANLIB)" \
  70.                     "LOADLIBES=$(LOADLIBES)" \
  71.                     "LDFLAGS=$(LDFLAGS)" \
  72.                     "BISON=$(BISON)" $(DO)) ; then true ; \
  73.             else exit 1 ; fi ; \
  74.         else true ; fi ; \
  75.     done
  76.  
  77. bootstrap:
  78.     $(MAKE) all
  79.     $(MAKE) stage1
  80.     $(MAKE) pass "stagepass=stage1"
  81.     $(MAKE) stage2
  82.     $(MAKE) pass "stagepass=stage2"
  83.     $(MAKE) comparison
  84.  
  85. bootstrap2:
  86.     $(MAKE) pass "stagepass=stage1"
  87.     $(MAKE) stage2
  88.     $(MAKE) pass "stagepass=stage2"
  89.     $(MAKE) comparison
  90.  
  91. bootstrap3:
  92.     $(MAKE) pass "stagepass=stage2"
  93.     $(MAKE) comparison
  94.  
  95. pass:
  96.     cp $(unsubdir)/gcc`if [ -d $(unsubdir)/gcc.$(target) ] ; \
  97.                 then echo .$(target) ; fi`/gstdarg.h $(unsubdir)/gas/stdarg.h
  98.     $(MAKE) subdir_do DO=all "DODIRS=$(SUBDIRS)" \
  99.         "CC=`pwd`/$(unsubdir)/gcc`if [ -d $(unsubdir)/gcc.$(target) ] ; \
  100.         then echo .$(target) ; fi`$(subdir)/$(stagepass)/gcc \
  101.         -O \
  102.         -B`pwd`/$(unsubdir)/gcc`if [ -d $(unsubdir)/gcc.$(target) ] ; \
  103.         then echo .$(target) ; fi`$(subdir)/$(stagepass)/ \
  104.         -B`pwd`/$(unsubdir)/gas`if [ -d $(unsubdir)/gas.$(target) ] ; \
  105.         then echo .$(target) ; fi`$(subdir)/$(stagepass)/ \
  106.         -B`pwd`/$(unsubdir)/ld`if [ -d $(unsubdir)/ld.$(target) ] ; \
  107.         then echo .$(target) ; fi`$(subdir)/$(stagepass)/" \
  108.         "AR=`pwd`/$(unsubdir)/binutils`if [ -d $(unsubdir)/binutils.$(target) ] ; \
  109.         then echo .$(target) ; fi`$(subdir)/$(stagepass)/ar" \
  110.         "RANLIB=`pwd`/$(unsubdir)/binutils`if [ -d $(unsubdir)/binutils.$(target) ] ; \
  111.         then echo .$(target) ; fi`$(subdir)/$(stagepass)/ranlib" \
  112.         "LOADLIBES=`pwd`/$(unsubdir)/gnulib`if [ -d $(unsubdir)/binutils.$(target) ] ; \
  113.         then echo .$(target) ; fi`$(subdir)/$(stagepass)/gnulib.a /lib/libc.a" \
  114.         "LDFLAGS=-nostdlib /lib/crt0.o \
  115.         -L`pwd`/$(unsubdir)/gnulib`if [ -d $(unsubdir)/gnulib.$(target) ] ; \
  116.         then echo .$(target) ; fi`$(subdir)/$(stagepass)/ \
  117.         -B`pwd`/$(unsubdir)/ld`if [ -d $(unsubdir)/ld.$(target) ] ; \
  118.         then echo .$(target) ; fi`$(subdir)/$(stagepass)/"
  119.  
  120.  
  121. stage1:
  122.     $(MAKE) subdir_do DO=stage1 "DODIRS=$(SUBDIRS)"
  123.  
  124. stage2:
  125.     $(MAKE) subdir_do DO=stage2 "DODIRS=$(SUBDIRS)"
  126.  
  127. stage3:
  128.     $(MAKE) subdir_do DO=stage3 "DODIRS=$(SUBDIRS)"
  129.  
  130. stage4:
  131.     $(MAKE) subdir_do DO=stage4 "DODIRS=$(SUBDIRS)"
  132.  
  133. against=stage2
  134.  
  135. comparison:; $(MAKE) subdir_do DO=comparison against=$(against) "DODIRS=$(SUBDIRS)"
  136.  
  137. de-stage1:; $(MAKE) subdir_do DO=de-stage1 "DODIRS=$(SUBDIRS)"
  138. de-stage2:; $(MAKE) subdir_do DO=de-stage2 "DODIRS=$(SUBDIRS)"
  139. de-stage3:; $(MAKE) subdir_do DO=de-stage3 "DODIRS=$(SUBDIRS)"
  140. de-stage4:; $(MAKE) subdir_do DO=de-stage4 "DODIRS=$(SUBDIRS)"
  141.  
  142. clean:
  143.     rm -rf *.a TEMP errs core *.o *~ \#* TAGS *.E
  144.     $(MAKE) subdir_do DO=clean "DODIRS=$(SUBDIRS) $(OTHERS)"
  145.  
  146. install: install-dirs install-fixed-includes
  147.     $(MAKE) subdir_do DO=install "DODIRS=$(SUBDIRS) $(OTHERS)"
  148.  
  149. # The "else true" stuff is for Ultrix; the shell returns the exit code
  150. # of the "if" command, if no commands are run in the "then" or "else" part,
  151. # causing Make to quit.
  152. install-dirs: force
  153.     - mkdir $(destdir)
  154.     - mkdir $(destdir)/H-$(host_alias)
  155.     - mkdir $(destdir)/H-$(host_alias)/T-independent
  156.     - mkdir $(destdir)/H-$(host_alias)/T-independent/bin
  157.     - mkdir $(destdir)/H-$(host_alias)/T-independent/lib
  158.     - mkdir $(destdir)/H-$(host_alias)/T-$(target_alias)
  159.     - mkdir $(destdir)/H-$(host_alias)/T-$(target_alias)/bin
  160.     - mkdir $(destdir)/H-$(host_alias)/T-$(target_alias)/lib
  161.     - mkdir $(destdir)/H-independent
  162.     - mkdir $(destdir)/H-independent/include
  163.     - mkdir $(destdir)/H-independent/doc
  164.     - mkdir $(destdir)/H-independent/man
  165.     - mkdir $(destdir)/H-independent/man/man1
  166.     - mkdir $(destdir)/H-independent/man/man2
  167.     - mkdir $(destdir)/H-independent/man/man3
  168.     - mkdir $(destdir)/H-independent/man/man4
  169.     - mkdir $(destdir)/H-independent/man/man5
  170.     - mkdir $(destdir)/H-independent/man/man6
  171.     - mkdir $(destdir)/H-independent/man/man7
  172.     - mkdir $(destdir)/H-independent/man/man8
  173.     if [ -d $(unsubdir)/gcc`if [ -d $(unsubdir)/gcc.$(target) ] ; \
  174.                 then echo .$(target) ; fi`$(subdir) ] ; then \
  175.         (cd  $(unsubdir)/gcc`if [ -d $(unsubdir)/gcc.$(target) ] ; \
  176.                     then echo .$(target) ; fi`$(subdir) ; \
  177.                 $(MAKE) install-dir) ; \
  178.     else true; \
  179.     fi
  180.  
  181. install-fixed-includes: force
  182.     if [ -d $(unsubdir)/gcc`if [ -d $(unsubdir)/gcc.$(target) ] ; \
  183.                 then echo .$(target) ; fi`$(subdir) ] ; then \
  184.         (cd  $(unsubdir)/gcc`if [ -d $(unsubdir)/gcc.$(target) ] ; \
  185.                     then echo .$(target) ; fi`$(subdir) ; \
  186.                 $(MAKE) install-fixed-includes) ; \
  187.     else true; \
  188.     fi
  189.  
  190. etags tags: TAGS
  191.  
  192. TAGS: FORCE
  193.     etags `$(MAKE) ls`
  194.  
  195. ls:
  196.     @echo Makefile
  197.     @for i in $(SUBDIRS); \
  198.     do \
  199.         (cd $$i; \
  200.             pwd=`pwd`; \
  201.             wd=`basename $$pwd`; \
  202.             for j in `$(MAKE) ls`; \
  203.             do \
  204.                 echo $$wd/$$j; \
  205.             done) \
  206.     done
  207.  
  208. force:
  209.  
  210. # with the gnu make, this is done automatically.
  211.  
  212. Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
  213.     $(SHELL) ./config.status
  214.  
  215. #
  216. # Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
  217.  
  218. DEVO_SUPPORT= README README.configure Makefile.in configure configure.in \
  219.     config.sub config
  220. GDB_SUPPORT_DIRS= bfd include libiberty readline
  221. GDB_SUPPORT_FILES= $(GDB_SUPPORT_DIRS) texinfo/fsf/texinfo.tex
  222.  
  223. setup-dirs: force_update
  224.     ./configure sun4
  225.     make clean
  226.     ./configure -rm sun4
  227.     chmod og=u `find $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
  228.  
  229. bfd.ilrt.tar.Z: setup-dirs
  230.     rm -f bfd.ilrt.tar.Z
  231.     tar cf - $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) \
  232.         | compress -v >bfd.ilrt.tar.Z
  233.  
  234. gdb.tar.Z: setup-dirs
  235.     (cd gdb; $(MAKE) -f Makefile.in make-proto-gdb.dir)
  236.     $(MAKE) $(MFLAGS) -f Makefile.in make-gdb.tar.Z
  237.  
  238. make-gdb.tar.Z: $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS) gdb texinfo/fsf/texinfo.tex
  239.     rm -rf proto-toplev; mkdir proto-toplev
  240.     ln -s ../gdb/proto-gdb.dir proto-toplev/gdb
  241.     (cd proto-toplev; for i in $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS); do \
  242.         ln -s ../$$i . ; \
  243.     done)
  244.     mkdir proto-toplev/texinfo
  245.     mkdir proto-toplev/texinfo/fsf
  246.     ln -s ../../../texinfo/fsf/texinfo.tex proto-toplev/texinfo/fsf/
  247.     chmod og=u `find proto-toplev -print`
  248.     (VER=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
  249.         echo "==> Making gdb-$$VER.tar.Z"; \
  250.         ln -s proto-toplev gdb-$$VER; \
  251.         tar cfh - gdb-$$VER \
  252.         | compress -v >gdb-$$VER.tar.Z)
  253.  
  254. force_update:
  255.  
  256. # end of Makefile.in
  257.